Systems and methods of communicating platform-independent representation of source code

ABSTRACT

A method includes receiving, at a media player software application at a computing device, a first portion of a media stream, and initiating playback of the first portion of the media stream. The method also includes receiving a second portion of the media stream during the playback of the first portion of the media stream, the second portion of the media stream including a platform-independent representation of source code. The method further includes compiling the platform-independent representation of the source code to generate a platform-specific software component that is executable by the computing device. The method includes executing the platform-specific software component at the computing device during execution of the media player software application at the computing device.

BACKGROUND

The popularity of the Internet, coupled with the increasing capabilitiesof personal/mobile electronic devices, has provided consumers with theability to enjoy multimedia content almost anytime and anywhere. Forexample, live content (e.g., sports events) and video on demand (VOD)content (e.g., television shows and movies) can be streamed via theInternet to personal electronic devices (e.g., computers, mobile phones,Internet-enabled televisions, etc.). Various types of personalelectronic devices are available to consumers. Different devices mayhave different screen sizes and may be compatible with different audioformats, video formats, streaming protocols, wireless connection speeds,etc.

To playback video streams, electronic devices typically execute a mediaplayer software application, alternatively referred to as a “player.”Some operating systems for mobile phones, tablet computers, etc. havebuilt-in players. Users can also download third-party players to theirdevices for free or for a fee. To offer a player for multiple types ofelectronic devices, a software company may have to develop the playerfor multiple hardware/software platforms, including reprogramming orporting source code into multiple programming languages and compilingthe player application separately for each of the platforms. Moreover,this process may be repeated each time a new version of the player, ornew functionality (e.g., a plugin) is released.

SUMMARY

The present application provides a system and method to deploy a playeror plugin without having to manually develop/port/compile the player orplugin into the native formats for each hardware/software platform. Inaccordance with the described techniques, plugin (or player) code may bewritten in one language and may be automatically translated into otherlanguages for multiple platforms. To enable the translation, compilingthe plugin source code may include parsing the source code to produce aplatform-independent intermediate format representation of the code.

The intermediate format representation may be streamed to player devicesfor platform-specific compilation. Thus, to deploy a new plugin, theplugin can be written once in a high-level language and then parsed togenerate an intermediate format representation that is streamed toindividual player devices that convert the intermediate formatrepresentation into a platform-specific representation.

One example of an intermediate format representation is an abstractsyntax tree (AST). The AST can be delivered to player devices as part ofa media stream for a live or video on demand (VOD) event. For example, a“poll the viewers” plugin can be delivered in just-in-time fashionduring streaming of a game show. As another example, a social networkingplugin that is executable from within the player application can bedelivered as part of a media stream to enable a user to send and receivesocial networking messages from within the player application whileviewing the media stream.

Upon receiving the AST, a player device compiles and links the AST intoa platform-specific or “native” implementation (e.g., machine languageand/or binary code) for that player device. The platform-specificimplementation can include, but is not limited to, x86 for Windows orMac OS devices, x86 or ARM for Android devices, ARM for iOS devices,RISC or ARM for set-top boxes, etc. The compiler that compiles the ASTto generate the native implementation can be a part of the player (e.g.,the compiler can be automatically installed when the user downloads theplayer from an application storefront). Advantageously, because the ASTis compiled into native code, the compiled plugin will use controls thatmatch the native “look and feel” of the platform. The player device mayerase the compiled plugin after use, or the player device may can cachethe compiled plugin for subsequent use (e.g., so that the AST does nothave to be streamed to the player device the next time a game showcontestant elects to “poll the viewers”).

It is noted that the techniques of the present application differ fromvirtual machines (e.g., for Java and C#) and interpreters (e.g., usedfor OpenTV and enhanced TV binary interchange format (EBIF)) because aseparate virtual machine or interpreter is not relied upon to generateplatform-specific commands via translation. Instead, the player compilesa platform-independent AST on-the-fly to generate a native plugin, wherereceipt of the AST, compilation of the AST, and execution of the nativeplugin can occur during a streaming session without interrupting receiptand playback of a media stream. Compiling ASTs into native runtimes mayalso result in improved performance as compared to using a virtualmachine or interpreter, which introduces a layer of indirection that canresult in loss of performance (e.g., loss of speed) during pluginexecution. The just-in-time delivery of plugins described in the presentapplication may also be more convenient than requiring users todownload/reinstall an updated version of the player each time a newplugin is developed or an existing plugin is updated.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a diagram of an illustrative embodiment of a system that isoperable to support communication of a platform-independentrepresentation of source code to a computing device;

FIG. 2 is a diagram of another illustrative embodiment of a system thatis operable to support communication of a platform-independentrepresentation of source code to a computing device;

FIG. 3 is a diagram of an illustrative embodiment of a media playerinstaller package;

FIG. 4 is a diagram of an illustrative embodiment of parsing source codeto generate an abstract syntax tree;

FIG. 5 is a diagram of an illustrative embodiment of a social networkingplugin for a media player application;

FIG. 6 is a flowchart of an illustrative embodiment of a method ofdynamically compiling and executing a software component;

FIG. 7 is a flowchart of an illustrative embodiment of a method ofgenerating a platform-independent representation of a softwarecomponent; and

FIG. 8 is a diagram of another illustrative embodiment of a system thatis operable to support communication of a platform-independentrepresentation of source code to a computing device.

DETAILED DESCRIPTION

FIG. 1 illustrates a particular embodiment of a system 100 that includesa media server 110 and a computing device 130. The media server 110 mayreceive data (e.g., a live media stream 102 from a capture device, suchas a camera, or from another media server or computing device). Themedia server 110 may also send data (e.g., an illustrative media stream120) to the computing device 130 and/or another device. In a particularembodiment, the media server 110 communicates via networks, such as alocal area network (LAN) or the Internet, via a wired or wirelessnetwork connection. It should be noted that although certain operationsmay be described herein as being performed by the media server 110 orthe computing device 130, in alternative embodiments such operations maybe performed by one or more other types of devices, such as desktopcomputers, laptop computers, mobile phones/smartphones, tabletcomputers, portable computing devices, game consoles, set-top boxes,televisions, cloud servers, etc. Moreover, operations described as beingperformed by one device may alternatively be performed by anotherdevice.

The media server 110 may include a data storage device(s) 111, which mayinclude non-volatile storage devices (e.g., disk-based storagedevice(s)), cache storage devices (e.g., static random-access memory(SRAM)), or a combination of both. The data storage device(s) 111 maystore content 112 (e.g., video on demand (VOD) and/or digital videorecorder (DVR)) content.

The media server 110 may also include a transcoder 113 configured totranscode the live media stream 102 and/or the content 112. Toillustrate, the transcoder 113 may generate multiple versions of thelive media stream 102 and/or the content 112 for communication to playerdevices, such as the computing device 130. In the example of FIG. 1, thetranscoder 113 generates audio/video data 121, 122, 124, 125 fortransmission as part of the media stream 120. Each of the audio/videodata 121, 122, 124, 125 may correspond to one or more data packetsformatted in accordance with a multimedia communication protocol, asfurther described with reference to FIG. 8.

In a particular embodiment, to facilitate the use of adaptive bitrate(ABR) streaming, the transcoder 113 may generate multiple ABR renditionsof the live media stream 102 and/or the content 112. Each ABR renditionmay have a distinct bitrate (e.g., video bitrate and/or audio bitrate).ABR renditions may also differ from each other with respect to otheraudio and video quality parameters, such as frame size, frame rate,video coder/decoder (CODEC), audio CODEC, number of audio channels, etc.Thus, the transcoder 113 may perform bitrate conversion, CODECconversion, frame size conversion, etc. The media server 110 may provideone or more of the ABR renditions generated by the transcoder 113 toother devices, such as the computing device 130. ABR streaming isfurther described with reference to FIG. 8.

The media server 110 may also include a parser 114. The parser may 114receive source code 115 and may generate a platform-independentrepresentation 123 of the source code 115. As used herein, a “platformindependent representation” of source code is a representation that canbe compiled by different compilers to generate “native” (e.g.,platform-specific) applications (e.g., instructions) that are executableat a device without further translation or interpretation. For example,the same platform independent representation 123 may be compiled at afirst device to generate a native executable for a first instruction setarchitecture and may be compiled at a second device to generate a nativeexecutable for a second instruction set architecture. Examples ofplatform-specific architectures include, but are not limited to, x86 forWindows or Mac OS devices, x86 or ARM for Android devices, ARM for iOSdevices, RISC or ARM for set-top boxes, etc. An illustrativenon-limiting example of a platform-independent representation of sourcecode is an abstract syntax tree (AST), which is further described withreference to FIG. 4.

The computing device 130 may include a display device 131, a mediaplayer 132 (e.g., a media player software application), a compiler 134,and data storage device(s) 135. The media player 132 may be configuredto receive the media stream 120 and initiate output of the media stream120 (e.g., display of video at the display device 131 and output ofaudio at a speaker or headset/auxiliary output). The media player 132may also be configured to detect that the platform-independentrepresentation 123 has been received, and to invoke the compiler 134 tocompile the platform-independent representation 123.

The compiler 134 may compile the platform-independent representation 123to generate a native (e.g., platform-specific) executable. Thus, thecompiler 134 may be specific to an architecture, operating system, etc.of the computing device. In the example of FIG. 1, the compiler 134generates a software component 133 for the media player 132. Thesoftware component 133 may be a new software component or an update toan existing software component at the media player 132. For example, thesoftware component 133 may be a plugin that can be executed by the mediaplayer 132 without interrupting playback of the media stream 120 at thedisplay device 131. Illustrative examples of such plugins are furtherdescribed with reference to FIGS. 2 and 5. The software component 133can be stored at the computing device 130 or can be deleted afterexecution. In the example of FIG. 1, a plugin 136 has been stored in thedata storage device(s) 135, e.g., so that the plugin 136 can besubsequently retrieved (e.g., based on a search using a name oridentifier of the plugin 136) and re-executed by the media player 132without invoking the compiler 134 and re-compiling theplatform-independent representation 123. For example, as furtherdescribed with reference to FIG. 2, the computing device 130 may receivea signal (e.g., a plugin call) to re-execute the plugin 136, and mayretrieve and re-execute the plugin 136 in response to the signal. Thesignal (e.g., plugin call) may be received as part of the media stream120, as part of a separate media stream, or independent (e.g., outside)of a media stream.

It should be noted that although the compiler 134 is shown external tothe media player 132 in FIG. 1, in alternative embodiments, the compiler134 may part of the media player 132. Thus, in accordance with thepresent disclosure, an installer package (e.g., file) for the mediaplayer 132 may include both the compiler 134 and the media player 132.In an illustrative example, the installer package may be downloaded andto the computing device 130 from an application storefront, via adownload URL, etc. FIG. 3 illustrates an example of such an installerpackage 300. The installer package 300 may be stored in acomputer-readable storage device, such as the data storage device(s)111, the data storage device(s) 135, etc. Examples of installer packagesinclude, but are not limited to, .exe files, .apk files, .msi files,.app files, .dmg files, etc. As shown in FIG. 3, the installer package300 includes both a compiler 302 and a media player 304. The compiler302 may be designed to generate native runtimes/executables for aparticular device type, architecture, operating system, etc. The mediaplayer 304 may include executable instructions for stream playback 306.The media player 304 may also include plugin(s) 308 that are installedas part of the installation process for the media player 304. Suchpre-installed plugin(s) 308 may be updated using theplatform-independent representation 123 of FIG. 1, as described above.The media player 304 may also include a detector 310 to detect receiptof a platform-independent representation (e.g., an AST) and to invokethe compiler 302 to compile the platform-independent representation.

Other computing devices (not shown in FIG. 1) may similarly includecompilers that can generate platform-specific plugins for those devices.It will thus be appreciated that through communication of theplatform-independent representation 123, the system 100 of FIG. 1enables a write-once-execute-anywhere paradigm for deploying softwarecomponents (or entire software applications). Software developers canwrite the source code 115 once and each computing device that receivesthe platform-independent representation 123 can compile theplatform-independent representation 123 into the appropriate nativebinary for execution without interrupting playback of the media stream120. In addition, when multiple devices are receiving the media stream120, each such device can compile and generate its own softwarecomponent 133 from the same platform-independent representation 123.Thus, a software vendor may no longer have to distribute variousplatform-specific updates to different devices (e.g., via differentapplication storefronts or update notifications).

During operation, the media server 110 may transmit the media stream 120to the computing device 130 and to one or more other computing devices(e.g., via unicast, multicast, broadcast, etc.). The media stream 120may include various portions. For example, a first portion of the mediastream 120 may include the video data 121 and the audio data 122, asecond portion of the media stream 120 may include theplatform-independent representation 123, and a third portion of themedia stream 120 may include the video data 124 and the audio data 125.The media player 132 may initiate playback of the video data 121 and theaudio data 122. The compiler 134 may compile the platform-independentrepresentation 123 to generate the software component 133, which may beexecuted by the media player 132 without interrupting playback of themedia stream 120. For example, the display device 131 may seamlesslytransition from displaying the video data 121 to displaying the videodata 124 while the software component 133 is executed.

The system 100 of FIG. 1 may thus enable communication of softwarecomponents within a media stream for on-the-fly compilation andexecution. The compilation and execution of the software components maybe transparent from the perspective of the user, and may thus bepreferable to requiring download and installation of a new version ofthe media player 132 each time a new plugin is developed or an existingplugin is updated. It is noted that the techniques of the presentapplication differ from virtual machines (e.g., for Java and C#) andinterpreters (e.g., used for OpenTV and enhanced TV binary interchangeformat (EBIF)) because a separate virtual machine or interpreter is notrelied upon to generate platform-specific commands via translation.Instead, a compiler within the media player (or invoked by the mediaplayer) compiles a platform-independent representation on-the-fly togenerate a native plugin, where receipt of the platform-independentrepresentation, compilation of the platform-independent representation,and execution of the native plugin can occur during a streaming sessionfor a media stream without interrupting receipt and playback of a mediastream. Compiling a platform-independent representation into a nativeruntime may also result in improved performance as compared to using avirtual machine or interpreter, which introduces an additional layer ofindirection

Whereas FIG. 1 illustrates communication of the platform-independentrepresentation 123 as part of the media stream 120, the presentdisclosure also provides for communicating a platform-independentrepresentation separately from a media stream and/or from a separateserver/device than the server/device communicating the media stream. Forexample, in the system 200 of FIG. 2, the media server 110 sends theplatform-independent representation 123 to the computing device 130,whereas different servers 240, 250 send media streams 242, 252 to thecomputing device 130.

The platform-independent representation 123 and the media streams 242,252 may be sent to the computing device 130 at various times and invarious orders. As a first example, the computing device 130 may receivethe media stream 242 from the server 240. The media stream 242 mayinclude a plugin call, e.g., a command that causes a media player of thecomputing device 130 to execute a particular plugin. The media playermay check whether the called plugin is available (e.g., by searching adata storage device or cache using a name or identifier of the plugin).If the called plugin is available, the media player may execute theplugin. If the plugin is not available, the media player may request theplatform-independent representation 123 from the media server 110. Forexample, the plugin call in the media stream 232 may include informationindicating that the platform-independent representation 123 can berequested from the media server 110. To illustrate, the plugin call mayinclude a uniform resource locator (URL) for the platform-independentrepresentation 123, where the URL identifies the media server 110. Thecomputing device 130 may receive the platform-independent representation123 from the media server 110, compile the platform-independentrepresentation 123, and execute the resulting plugin withoutinterrupting playback of the media stream 242, as described withreference to FIG. 1. In an alternative embodiment, the media server 110may send the platform-independent representation 123 to the computingdevice 130 in response to a request from the server 240. Thus, thepresent disclosure may enable just-in-time acquisition of a plugin inresponse to a request from a media player, a server, etc.

In another example of operation, the computing device 130 may havereceived and compiled the platform-independent representation 123 priorto receiving the plugin call in the media stream 242 or a plugin call inthe media stream 252. In response to the plugin call, the computingdevice 130 may execute the previously compiled plugin. Thus, the presentdisclosure may enable different content providers or servers (e.g., theservers 240, 250) to invoke a common plugin of a media player. Theplugin calls from the different content providers or servers may havedifferent data. To illustrate, in the example of FIG. 2, an audiencevoting plugin presents choices for where a viewer thinks a realitytelevision character named John should go. A different content provideror server may call the same audience voting plugin but may provide adifferent question, different answer choices, etc. For example, during agame show, the same audience voting plugin may be used to let viewersanswer a trivia question. As another example, during a talent show, thesame audience voting plugin may be used to determine which contestant(s)will be voted off the show.

When a user of the computing device 130 interacts with a plugin, theplugin may generate data that is transmitted to a destination identifiedby the plugin or by the plugin call that resulted in execution of theplugin. To illustrate, in the example of FIG. 2, after the user selectsthe depicted “Downstream,” “Upstream,” or “Into the Jungle” button, thecomputing device 130 may send the server 240 data 244 indicating theuser's selection. The server 240 may aggregate the data 244 with datareceived from other devices (e.g., to determine where John should go innext week's episode).

In another example of operation, a plugin call can be sent to thecomputing device 130 outside of a media stream. For example, as shown inFIG. 2, the media server 110 may send the plugin call 228 to thecomputing device 130 without the plugin call 228 being part of a mediastream. The present disclosure thus enables a device to invoke a pluginon another device by sending a plugin call within or separately from amedia stream. In a particular embodiment, plugin calls include securitymeasure to prevent unauthorized parties from invoking plugins. Forexample, plugin calls may include identify information, cryptographickeys, etc., and the computing device 130 may check such securitymeasures prior to executing a plugin.

In other examples of operation, the platform-independent representation123 and/or a plugin call (e.g., the plugin call 228) may be sent to thecomputing device 130 in response to a schedule or timer (e.g., forperiodic software updates), in response to user input at the mediaserver 110 (e.g., when a software vendor elects to deploy a pluginupdate), etc. The systems of FIGS. 1-2 thus enable deploying plugins tocomputing devices having different device types, operating systems,architectures, etc. in various scenarios without having to developplatform-specific source code for each of the device types, operatingsystems, architectures, etc.

FIG. 4 depicts an example of source code 400 for the audience votingplugin illustrated in FIG. 2 and an abstract syntax tree (AST) 450 thatmay be generated from the source code. It should be noted that theC-style source code 400 and the format of the AST 450 shown in FIG. 4are for example only, and are not to be considered limiting. Inalternative embodiments, the systems and methods of the presentdisclosure may be used with different types of source code and differenttypes of ASTs or other platform-independent representations of sourcecode.

The source code 400 for the audience voting plugin includes a statementto resize a current video playback window to half its size (e.g., resizewidth of the window to half the maximum available width and resizeheight of the window to half the available height). It is to be notedthat the resizeVideo( ) function included in the source code 400 may beplatform-independent. That is, a native resizeVideo( ) function may notbe available at individual media player devices that the audience votingplugin is deployed to. Instead, during compilation of the AST 450 (e.g.,in a top-to-bottom, left-to-right fashion), a compiler at a media playerdevice may convert the resizeVideo( ) function call to one or moreplatform-specific (e.g., native) function calls for that media playerdevice. The compiler may thus compile the AST 450 into native high-levellanguage (HLL) instructions, native assembly or machine languageinstructions (e.g. loads, stores, jumps, etc.), etc. Thus, in aparticular embodiment, each compiler may store mappings betweenplatform-independent function calls (e.g., resizeVideo( )) used bysoftware developers and the native function calls and/or instructionsthat the platform-independent function calls are to converted intoduring compilation.

It will be appreciated that by converting an AST into native functioncalls, the systems and methods of the present disclosure may preservenative formatting of graphical user interface (GUI) elements. Forexample, the same audience voting plugin, when executed at differentdevices, may use different native GUI styles (e.g., rounded buttons vs.rectangular buttons, certain font styles, etc.). Thus, from theperspective of a user, plugins deployed in accordance with the describedtechniques may appear to be a natural part of a media playerapplication, and may not appear out-of-place or as a potentiallyincompatible add-on.

In FIG. 4, the depicted portion of the AST 450 corresponds to theresizeVideo( ) function call in the source code 400 (which is emphasizedusing bold and italic type). It is to be understood that the remaininginstructions in the source code 400 may be parsed into additionalbranches/sub-branches of the AST 450, which are omitted for clarity.

As described with reference to FIG. 2, the same audience voting pluginmay be invoked with different questions and answers and may send userselection data to different destination servers. In the example, of FIG.4, this flexibility is represented using input parameters for the numberof answer choices (“numChoices”), the question (“question”), the list ofanswers (“answers[ ]”), and the destination server URL (“serverURL”).The audience voting plugin may thus be called with different values ofthe input parameters at different times to implement different types ofaudience voting scenarios.

FIG. 5 illustrates another example of a plugin that may be compiled andexecuted by a media player without interrupting playback of a mediastream, and is generally designated 500. The plugin shown in FIG. 5 is asocial network client that enables a user to read social networkingmessages, post social networking messages, and post a selfie (e.g.,captured by a camera of a computing device) without interruptingplayback of a media stream.

It should be noted that the plugin examples described and illustratedherein are for example only, and are not to be considered limiting. Thesystems and methods of the present disclosure may also be used withother types of plugins, such as a chat plugin or a plugin to adjustaudio/video playback within the media player (e.g., a play speedadjustment plugin, a music visualization plugin, etc.). As additionalnon-limiting examples, a song identifier or lyrics retrieval plugin maybe deployed in accordance with the present disclosure, where suchplugins search one or more remote databases based on to identify a songthat is being played by a media player or to retrieve lyrics for thesong being played by the media player. To illustrate, the data 244 sentby the computing device 130 may correspond to a search query issued by asong identifier plugin or a lyrics retrieval plugin. The search querymay be received by a server (e.g., the server 240), and the server mayprovide search results to the computing device 130, where the searchresults are displayed (e.g., in a plugin window) without interruptingplayback of the song. Moreover, it is to be understood that the systemsand methods of the present disclosure can be used to updatefunctionality at applications other than a media player (e.g., a webbrowser, a game, a word processor, a spreadsheet application, apresentation application, etc.)

FIG. 6 is a flowchart to illustrate a particular embodiment of a method600 of operation at a computing device. In an illustrative embodiment,the method 600 may be performed by the computing device 130 of FIGS.1-2.

The method 600 includes receiving, at a media player softwareapplication at a computing device, a first portion of a media stream, at602. The method 600 also includes initiating playback of the firstportion of the media stream, at 604. For example, in FIG. 1, thecomputing device 130 may receive and initiate playback of a firstportion of the media stream 120, such as the video data 121 and theaudio data 122.

The method 600 also includes receiving a second portion of the mediastream during the playback of the first portion of the media stream, at606. The second portion of the media stream may include aplatform-independent representation of source code. For example, in FIG.1, during playback of the video data 121 and the audio data 122, thecomputing device 130 may receive the platform-independent representation123 of the source code 115.

The method 600 further includes compiling the platform-independentrepresentation of the source code to generate a platform-specificsoftware component that is executable by the computing device, at 608.The method 600 includes executing the platform-specific softwarecomponent at the computing device during execution of the media playersoftware application at the computing device, at 610. For example, inFIG. 1, the compiler 134 may compile the platform-independentrepresentation 123 to generate the software component 133, and thesoftware component 133 may be executed by the media player 132, withoutinterrupting playback of the media stream 120. The software component133 may be stored at the computing device 130 or may be deleted afterexecution.

FIG. 7 is a flowchart to illustrate a particular embodiment of a method700 of operation at a device. In an illustrative embodiment, the method700 may be performed by a server, such as the media server 110 of FIGS.1-2, the server 240 of FIG. 2, or the server 250 of FIG. 2.

The method 700 includes parsing source code associated with a mediaplayer plugin to generate a platform-independent representation of thesource code, at 702. For example, in FIG. 1, the parser 114 may parsethe source code 115 to generate the platform independent representation123. In a particular embodiment, the parsing process includes convertingcommands included in the source code 115 into an AST, as described withreference to FIG. 4. For example, certain commands included in thesource code 115 may be converted into platform-independent commands thatcan be compiled by different compilers at different media playerdevices. In an alternative embodiment, the media server 110 may notparse the source code 115 (e.g., the parser 114 may be optional).Instead, the media server 110 may receive the platform-independentrepresentation 123 from another device for distribution to computingdevices (e.g., the computing device 130). Thus, in such a scenario, themedia server 110 may function as a software distribution server, and asoftware vendor may generate the platform-independent representation 123elsewhere prior to providing the platform-independent representation 123to the media server 110 for distribution to customers.

The method 700 also includes conducting a streaming session with adestination device, at 704, and sending a media stream to thedestination device during the streaming session, at 706. For example, inFIG. 1, the media server 110 may conduct a streaming session with thecomputing device 130 and send the media stream 120 to the computingdevice 130 during the streaming session. In particular embodiment,initiating and conducting a streaming session includes forming aconnection between an output port of the media server 110 and an inputport of the computing device 130, allocating a network path between themedia server 110 and the computing device 130, performing other sessionsetup operations, etc.

The method 700 further includes sending the platform-independentrepresentation of the source code to the computing device during thestreaming session, at 708. For example, in FIG. 1, the media server 110may send the platform-independent representation 123 to the computingdevice 130.

FIG. 8 illustrates another particular embodiment of a system 800 inaccordance with the present disclosure. The system 800 includes a mediaserver 850, which may correspond to the media server 110 of FIGS. 1-2,the server 240 of FIG. 2, or the server 250 of FIG. 2. The media server850 may include one or more processor(s) 851 and various components thatare executable by the processor(s) 851. The media server 850 may includesoftware application(s) that perform media serving or processing,hardware systems (e.g., servers) that support or perform media servingand processing, or any combination thereof. Thus, various operationsdescribed with reference to the media server 850, or components thereof,may be implemented using hardware, software (e.g., instructionsexecutable by the processor(s) 851), or any combination thereof.

The media server 850 may also include one or more network interface(s)852. For example, the network interface(s) 852 may include inputinterface(s) and output interface(s) that are configured to receive dataand to send data, respectively. In a particular embodiment, the networkinterface(s) 852 may be wired and/or wireless interfaces that enable themedia server 850 to communicate data via a network, such as theInternet. For example, the network interface(s) 852 may include anEthernet interface, a wireless interface compatible with an Institute ofElectrical and Electronics Engineers (IEEE) 802.11 (e.g., Wi-Fi)protocol, or other wired or wireless interfaces.

Thus, the media server 850 may be configured to receive and send datafrom various other devices (e.g., via a network, such as a local areanetwork (LAN) or the Internet, via a wired or wireless networkconnection). For example, the media server 850 may communicate with oneor more playback devices 870 (e.g., devices configured to output adisplay of a stream of live content and/or a stream of a VOD contentitem) and one or more other servers 880. The one or more playbackdevices 870 may include the computing device 130 of FIGS. 1-2. In aparticular embodiment, the media server 850 may receive a media stream804. In an illustrative example, the media stream 804 is received viaone or more stream capture sources (e.g., a camera or a video encoder)or via one or more media content servers (e.g., a video on demand (VOD)database server or a server of a content delivery network (CDN)).Accordingly, the media stream 804 may include a live stream or a VODstream. In an illustrative example, the media stream 804 corresponds tothe live media stream 102 of FIG. 1.

The media server 850 may support multiple coding technologies andprotocols. For example, the media server 850 may support video encodingtypes including, but not limited to, H.264, On2 VP6, Sorenson Spark,Screen video, Screen video 2, motion picture experts group (MPEG) 2(MPEG-2), MPEG-4 Part 2, and MPEG-4 Part 10. The media server 850 maysupport audio encoding types including, but not limited to, advancedaudio coding (AAC), AAC low complexity (AAC LC), AAC high efficiency(HE-AAC), G.711, MPEG Audio Layer 3 (MP3), Speex, Nellymoser Asao, andAC-3.

The media server 850 may support communication (e.g., adaptive streamingand non-adaptive streaming) protocols including, but not limited to,hypertext transfer protocol (HTTP) live streaming (HLS), HTTP dynamicstreaming (HDS), smooth streaming, and MPEG dynamic adaptive streamingover HTTP (MPEG-DASH) (also known as international organization forstandardization (ISO)/international electrotechnical commission (IEC)23009-1). The media server 850 may also support real time messagingprotocol (RTMP) (and variants thereof), real-time streaming protocol(RTSP), real-time transport protocol (RTP), and MPEG-2 transport stream(MPEG-TS). Additional audio formats, video formats, coder/decoders(CODECs), and/or protocols may also be supported.

The media server 850 may also include one or more transcoder(s) 855. Thetranscoder(s) 855 may include the transcoder 113 of FIG. 1. Thetranscoder(s) 855 may be configured to transcode the media stream 804 togenerate multiple ABR rendition(s) 865 of the media stream 804. The ABRrendition(s) 865 may be at least temporarily stored at one or more datastorage device(s) 859. The data storage device(s) 859 may include thedata storage device(s) 111 of FIG. 1. In a particular embodiment, thedata storage device(s) 859 also store VOD content 858 and/or DVRcontent. For example, the transcoder(s) 855 may transcode the VODcontent 858 to generate multiple ABR renditions of the VOD content 858,so that the media server 850 may provide VOD streams to one or more ofthe playback devices 870.

The ABR rendition(s) 865 of the media stream 804 may correspond todifferent quality renditions of the media stream 804. For example, thetranscoder(s) 855 may generate a high-quality ABR rendition of the mediastream 804 and/or may generate a lower-quality ABR rendition of themedia stream 804 that is suitable for streaming in low-bandwidth networkconditions. The transcoder(s) 855 may be configured to perform bitrateconversion, CODEC conversion, frame size conversion, etc. Moreover, suchtranscoding may be performed in response to requests from the playbackdevices 870. Thus, the media server 850 may be able to generate multipleABR rendition(s) 865 of the media stream 804 for different playbackdevices 870 experiencing different network conditions.

The one or more ABR rendition(s) 865 may be sent to the one or moreplayback devices 870. Moreover, as described herein, each of the one ormore ABR rendition(s) 865 may be used to communicate aplatform-independent representation of source code and/or a plugin call.In a particular embodiment, depending on a playback format supported bya requesting playback device 870, and/or transcoding parameters in useby the transcoder(s) 855, the media server 850 may send one or more ABRrenditions to the playback devices 870 based on requests received fromthe playback devices 870. In a particular embodiment, parameters used bythe transcoder(s) 855 are stored in one or more transcoding template(s)856. For example, the transcoding template(s) 856 may becomputer-readable files (e.g., eXtensible markup language (XML) files)that define transcoding parameters (e.g., bitrate, type of CODEC, etc.)for various stream renditions.

The media server may also include a parser 857, which may operate asdescribed with reference to the parser 114 of FIG. 1. For example, theparser 857 may parse source code 853 to generate a platform-independentrepresentation of the source code (e.g., an illustrative AST 891 or 896)for communication to the playback devices 870 and other servers 880.

During operation, the media server 850 may perform transcoding of themedia stream 804 (and/or the VOD content 858) for adaptive streaming. Asdescribed above, adaptive streaming is a media transmission mechanismthat enables a receiving device to dynamically request differentversions of a stream in response to changing network conditions. Forexample, one of the playback devices 870 (e.g., a desktop or laptopcomputing device 871, a television or set-top box 872, a smartphone 873,or a tablet computer 874) may initiate an adaptive streaming sessionwith the media server 850 for the media stream 804 (and/or a particularVOD content 858 item) by sending a first request 862. In an illustrativeexample, the first request 862 is generated in response to a userselecting a link to the media stream 804 (e.g., on a webpage), where thelink specifies an Internet address of the media server 850. The mediaserver 850 may send a manifest 863 to the initiating device (e.g., thecomputing device 871) in response to the first request 862. The manifest863 may include information describing each of the plurality of ABRrendition(s) 865 (if any) of the media stream 804 and/or the VOD content858 items. For example, the transcoding template(s) 856 may defineparticular available ABR rendition(s) 865 of the media stream 804 andthe manifest 863 may be automatically generated based on the transcodingtemplate(s) 856.

Upon receiving the manifest 863, the computing device 871 may determinewhich (if any) of the available ABR rendition(s) 865 of the media stream804 should be requested from the media server 850. For example, thecomputing device 871 may make such a determination based onbuffering/processing capability at the computing device 871 and/ornetwork conditions being experienced by the computing device 871. In aparticular embodiment, the manifest 863 may include aplatform-independent representation of source code for compilation togenerate a plugin, and/or may include a plugin call that results inexecution of an existing plugin.

Upon determining which ABR rendition should be requested, the computingdevice 871 may transmit a second request 864 to the media server 850.The second request 864 may specify a particular ABR rendition of themedia stream 804. If there are no problems with receipt and playback ofthe requested ABR rendition of the media stream 804, the computingdevice 871 may continue to receive the requested ABR rendition of themedia stream 804 for continued playback. However, if playback and/ornetwork conditions become worse, the computing device 871 may switch toa lower bitrate rendition by requesting a lower bitrate ABR rendition ofthe media stream 804. Conversely, if playback and/or network conditionsimprove, the computing device 871 may switch to a higher bitraterendition. The transcoder(s) 855 may generate key frame aligned portionsfor the adaptive streaming renditions, so that switching to a lowerbitrate or higher bitrate ABR rendition appears “seamless” (e.g., doesnot result in noticeable visual glitches or dropped frames at a playbackdevice 870, such as the computing device 871, the television/set-top box872, the smartphone 873, or the tablet computer 874).

Thus, during an adaptive streaming session, the media server 850 mayreceive the second request 864 from the computing device 871 for aparticular ABR rendition of the media stream 804. Upon receiving thesecond request 864, the media server 850 may check whether the requestedABR rendition of the media stream 804 is stored in the one or more datastorage device(s) 859. If so, the media server 850 may respond to thesecond request 864 by retrieving the requested ABR rendition from theone or more data storage device(s) 859 and transmitting the requestedABR rendition to the computing device 871. If the requested ABRrendition is part of a different ABR rendition, the transcoder(s) 855may generate the requested ABR rendition by transcoding the media stream804, and the generated ABR rendition(s) 865 may be transmitted to thecomputing device 871 in response to the second request 864.

In a particular embodiment, sending the generated ABR rendition(s) 865to the computing device 871 includes encoding and/or encapsulating thegenerated ABR rendition(s) 865 in accordance with the adaptive streamingprotocol being used by the computing device 871 (e.g., HLS, HDS, smoothstreaming, MPEG-DASH, etc.). As additional adaptive streaming requestsare received from the computing device 871 for the same or otherrenditions of the VOD item, the transcoder(s) 855 may generate theadditional requested portions on the fly as needed. During an adaptivestreaming session, the media server 850 may use the ABR rendition(s) toprovide the AST 891 to the playback devices 870. Thus, the presentdisclosure enables the media server 850 to send the AST 891 to theplayback devices 870 regardless of what bitrate stream is being sent tothe playback devices 870. Alternatively, the media server 850 may onlyinclude the AST 891 in high-bitrate renditions, because it may bedifficult to communicate the AST 891 in a low-bitrate rendition withoutimpacting playback quality at a playback device.

The described techniques may also be used to generate and transmitmultiple ABR rendition(s) 866 of the media stream 804 and/or the AST 896from the media server 850 to the other servers 880, as shown. Forexample, the media server 850 may transmit the ABR rendition(s) 866 andthe AST 896 to another media server 881, a stream relay server, and/orto a server (e.g., an edge server) of a content delivery network (CDN)882. To illustrate, an AST may be sent to edge servers of the CDN 882 tomake a plugins more readily available for deployment to devices indifferent geographic regions. In a particular embodiment, requestedcontent at the CDN 882 may be set up using a pull through cachingmechanism. The CDN 882 may include one or more edge HTTP cachingservers. If a cache miss for requested content occurs at a cachingserver, the caching server may pull the requested content from the mediaserver 850, which acts as an origin server.

It is to be understood that the order of steps or operations describedwith reference to FIGS. 1-8 is to be considered illustrative, notlimiting. In alternate embodiments, the order of steps may be different.Further, one or more steps may be optional and/or replaced by othersteps. In addition, one or more steps may be consolidated. In accordancewith various embodiments of the present disclosure, one or more methods,functions, and modules described herein may be implemented by softwareprograms executable by a computer system. Further, implementations caninclude distributed processing, component/object distributed processing,and/or parallel processing.

Particular embodiments can be implemented using a computer systemexecuting a set of instructions that cause the computer system toperform any one or more of the methods or computer-based functionsdisclosed herein. A computer system may include a laptop computer, adesktop computer, a server computer, a mobile phone, a tablet computer,a set-top box, a media player, one or more other computing devices, orany combination thereof. The computer system may be connected, e.g.,using a network, to other computer systems or peripheral devices. Forexample, the computer system or components thereof may include or may beincluded within any one or more of the media server 110, the computingdevice 130, the server 240, the server 250, the media server 850, thedesktop/laptop computing device 871, the TV/set-top box 872, thesmartphone 873, the tablet computer 874, the media server/stream relayserver 881, a server (e.g., edge server) of the CDN 882 of FIG. 8, orany combination thereof.

In a networked deployment, the computer system may operate in thecapacity of a server or as a client user computer in a server-clientuser network environment, or as a peer computer system in a peer-to-peer(or distributed) network environment. The term “system” can include anycollection of systems or sub-systems that individually or jointlyexecute a set, or multiple sets, of instructions to perform one or morecomputer functions.

In a particular embodiment, the instructions can be embodied in acomputer-readable storage device or a processor-readable storage device.The terms “computer-readable storage device” and “processor-readablestorage device” include a single storage device or multiple storagedevices, such as a centralized or distributed database, and/orassociated caches and servers that store one or more sets ofinstructions. The terms “computer-readable storage device” and“processor-readable storage device” also include any device that iscapable of storing a set of instructions for execution by a processor orthat cause a computer system to perform any one or more of the methodsor operations disclosed herein. For example, a computer-readable orprocessor-readable storage device may include random access memory(RAM), flash memory, read-only memory (ROM), programmable read-onlymemory (PROM), erasable programmable read-only memory (EPROM),electrically erasable programmable read-only memory (EEPROM), registers,a hard disk, a removable disk, a disc-based memory (e.g., compact discread-only memory (CD-ROM)), a solid-state memory, or any other form ofstorage device. A computer-readable or processor-readable storage deviceis not a signal.

As used herein, a “live” stream may differ from a “video on demand”(VOD) stream and a “digital video recorder” (DVR) stream. A VOD streamoriginates from, or corresponds to, content that is available in itsentirety at a stream source when a packet of the VOD stream is sent. Forexample, a VOD stream may correspond to a movie or television show thatis stored at a storage device. A live stream corresponds to content thatis not available in its entirety when a packet of the live stream issent. For example, a live stream may be used to transmit audio and/orvideo content corresponding to an event as the event is being captured(e.g., in real-time or near-real-time). Examples of such events mayinclude, but are not limited to, in-progress sporting events, musicalperformances, video-conferences, and webcam feeds. It should be notedthat a live stream may be delayed with respect to the event beingcaptured (e.g., in accordance with government or industry regulations,such as delay regulations enforced by the Federal CommunicationsCommission (FCC)). A DVR stream corresponds to a time-shifted version ofa live stream that is generated by a device that receives the livestream, where the device may still be receiving live stream or may havefinished receiving the live stream. Thus, network DVR content may begenerated by a device that receives a stream via a network and “records”the received stream, such as for subsequent transmission via a networkto another device. The described systems and methods may be used inconjunction with “live linear television (TV)” streams, which mayinclude a live feed, or a VOD asset or a DVR asset being rebroadcast asa live feed. It should also be noted that although certain embodimentsmay be described herein with reference to video streams, video on demandcontent, digital video recorder content, etc., not all of the describedtechniques may require video content/data. Certain embodiments may alsobe used with content that does not include video (e.g., audio on demand,radio content, music streams, etc.).

In a particular embodiment, a method includes receiving, at a mediaplayer software application at a computing device, a first portion of amedia stream, and initiating playback of the first portion of the mediastream. The method also includes receiving a second portion of the mediastream during the playback of the first portion of the media stream, thesecond portion of the media stream including a platform-independentrepresentation of source code. The method further includes compiling theplatform-independent representation of the source code to generate aplatform-specific software component that is executable by the computingdevice. The method includes executing the platform-specific softwarecomponent at the computing device during execution of the media playersoftware application at the computing device.

In another particular embodiment, an apparatus includes a processor anda memory storing instructions that, when executed by the processor,cause the processor to perform operations including conducting astreaming session with a destination device and sending a media streamto the destination device during the streaming session. The operationsfurther include sending a platform-independent representation of sourcecode to the destination device during the streaming session.

In another particular embodiment, a computer-readable storage devicestores an installer package for a media player software application,where the installer package is executable by a processor of a computingdevice to perform operations including installing the media playersoftware application at the computing device and installing a compilerat the computing device. The media player software application isexecutable by the processor to, during playback of a media stream,perform operations including receiving an abstract syntax tree (AST) inthe media stream, invoking the compiler to compile the AST to generate aplatform-specific plugin, and executing the platform-specific plugin.

The illustrations of the embodiments described herein are intended toprovide a general understanding of the structure of the variousembodiments. The illustrations are not intended to serve as a completedescription of all of the elements and features of apparatus and systemsthat utilize the structures or methods described herein. Many otherembodiments may be apparent to those of skill in the art upon reviewingthe disclosure. Other embodiments may be utilized and derived from thedisclosure, such that structural and logical substitutions and changesmay be made without departing from the scope of the disclosure.Accordingly, the disclosure and the figures are to be regarded asillustrative rather than restrictive.

Although specific embodiments have been illustrated and describedherein, it should be appreciated that any subsequent arrangementdesigned to achieve the same or similar purpose may be substituted forthe specific embodiments shown. This disclosure is intended to cover anyand all subsequent adaptations or variations of various embodiments.Combinations of the above embodiments, and other embodiments notspecifically described herein, will be apparent to those of skill in theart upon reviewing the description.

The Abstract is submitted with the understanding that it will not beused to interpret or limit the scope or meaning of the claims. Inaddition, in the foregoing Detailed Description, various features may begrouped together or described in a single embodiment for the purpose ofstreamlining the disclosure. This disclosure is not to be interpreted asreflecting an intention that the claimed embodiments require morefeatures than are expressly recited in each claim. Rather, as thefollowing claims reflect, inventive subject matter may be directed toless than all of the features of any of the disclosed embodiments.

The above-disclosed subject matter is to be considered illustrative, andnot restrictive, and the appended claims are intended to cover all suchmodifications, enhancements, and other embodiments, which fall withinthe scope of the present disclosure. Thus, to the maximum extent allowedby law, the scope of the present disclosure is to be determined by thebroadest permissible interpretation of the following claims and theirequivalents, and shall not be restricted or limited by the foregoingdetailed description.

What is claimed is:
 1. A method comprising: receiving, at a media playersoftware application at a computing device, a first portion of a mediastream; initiating playback of the first portion of the media stream;receiving a second portion of the media stream during the playback ofthe first portion of the media stream, the second portion of the mediastream including a platform-independent representation of source code;compiling the platform-independent representation of the source code togenerate a platform-specific software component that is executable bythe computing device; and executing the platform-specific softwarecomponent at the computing device during execution of the media playersoftware application at the computing device.
 2. The method of claim 1,wherein the platform-independent representation is compiled withoutinterrupting playback of the media stream at the computing device. 3.The method of claim 1, wherein the first portion and the second portionare received in accordance with a streaming protocol.
 4. The method ofclaim 1, wherein the computing device comprises a laptop computer, adesktop computer, a tablet computer, a mobile phone, a game console, aset-top box, a television, or any combination thereof.
 5. The method ofclaim 1, wherein the media player software application is part of anoperating system of the computing device.
 6. The method of claim 1,wherein the media player software application is downloaded to thecomputing device.
 7. The method of claim 1, wherein theplatform-independent representation comprises an abstract syntax tree(AST).
 8. The method of claim 1, wherein the platform-specific softwarecomponent is executed without interrupting playback of the media streamat the computing device.
 9. The method of claim 1, wherein theplatform-specific software component comprises a plugin of the mediaplayer software application.
 10. The method of claim 9, wherein theplugin comprises a social networking client that enables a user of thecomputing device to communicate via a social network withoutinterrupting playback of the media stream at the computing device. 11.The method of claim 9, wherein the plugin enables a user of thecomputing device to communicate with a server associated with the mediastream without interrupting display of the media stream at the computingdevice.
 12. The method of claim 1, further comprising: storing theplatform-specific software component at a memory of the computingdevice; receiving a signal to re-execute the platform-specific softwarecomponent; retrieving the platform-specific software component from thememory; and re-executing the platform-specific software componentwithout re-compiling the platform-independent representation.
 13. Themethod of claim 12, wherein the signal is received as part of the mediastream.
 14. The method of claim 12, wherein the signal is received aspart of a second media stream.
 15. The method of claim 1, furthercomprising deleting the platform-specific software component afterexecution of the platform-specific software component is complete. 16.The method of claim 1, wherein the platform-independent representationis compiled by a compiler that is compatible with the computing deviceand that is part of the media player software application.
 17. Anapparatus comprising: a processor; and a memory storing instructionsthat, when executed by the processor, cause the processor to performoperations comprising: conducting a streaming session with a destinationdevice; sending a media stream to the destination device during thestreaming session; compiling a platform-independent representation ofsource code to generate a platform-specific software component that isexecutable by the destination device; and sending theplatform-independent representation of the source code to thedestination device during the streaming session.
 18. A computer-readablestorage device storing: an installer package for a media player softwareapplication, wherein the installer package is executable by a processorof a computing device to perform operations comprising: installing themedia player software application at the computing device; andinstalling a compiler at the computing device, wherein the media playersoftware application is executable by the processor to, during playbackof a media stream, perform operations comprising: receiving an abstractsyntax tree (AST) in the media stream; invoking the compiler to compilethe AST to generate a platform-specific plugin; and executing theplatform-specific plugin.
 19. The computer-readable storage device ofclaim 18, wherein the compiler is part of the media player softwareapplication.
 20. The computer-readable storage device of claim 18,wherein the compiler is distinct from the media player softwareapplication.